package com.qiangqiang.task.server.mapper;

import com.qiangqiang.task.server.entity.Commission;
import com.qiangqiang.task.server.entity.Follow;
import com.qiangqiang.task.server.mapper.provider.CommissionProvider;
import com.qiangqiang.task.server.mapper.provider.FollowProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * @program: task
 * @description:
 * @author: Sky.lin
 * @create: 2019-03-10 16:24
 **/
@Mapper
public interface CommissionMapper {

    @InsertProvider(type = CommissionProvider.class, method = "insertCommission")
    int insertCommission(@Param("commission") Commission commission);

    @SelectProvider(type = CommissionProvider.class, method = "queryAllCommissionByUserId")
    List<Commission> queryAllCommissionByUserId(@Param("userId") long userId);
}
